import json

import redis
import time

queue_name = 'ip:192.168.1.180'
# 连接到Redis服务器
r = redis.Redis(host='192.168.1.111', port=6379, db=0)

body = {
    'export_onnx': True,
    'type': 'segment',
    'train_task_id': 7,
    'yaml_path': 'https://my-picture-1312810698.cos.ap-shanghai.myqcloud.com/detection/a2ca101e309343f490b8941d415bb632.yaml'
}

"""

"""
def producer():
    # 将消息添加到消息队列中
    r.rpush(queue_name, json.dumps(body))
    print(f"已发送消息: {body}")


producer()
